/*
 * DoArray.h
 *
 *  Created on: Oct 18, 2012
 *      Author: wtao
 */

#ifndef DOARRAY_H_
#define DOARRAY_H_

#include "_DoCompositeObject.h"

class DoArray : public onTokenListener, public _DoCompositeObject
{
protected:
	DoArray(const DoArray&);
	DoArray& operator=(const DoArray&);
public:
	DoArray();
	virtual ~DoArray();
	
	virtual onTokenListener::eContinueParse onChar(int currChar) {
		if (currChar == ']')
			return onTokenListener::eStop;
		return onTokenListener::eContinue;
	}

	virtual void onToken(CRefPtr< _DoObject > token) {
		if (token->type() == _DoObject::eComment)
			return;
		add(token);
	}
	
	virtual std::string _debug_dump() const;
};

#endif /* DOARRAY_H_ */
